import cv2

root_dir = 'D:/profiles/python/pythonJDK/Lib/site-packages/cv2/data/'

img = cv2.imread('13_y.jpg')
faceCascade = cv2.CascadeClassifier(root_dir + 'haarcascade_frontalface_default.xml')
faces = faceCascade.detectMultiScale(img, 1.15)
for (x, y, w, h) in faces:
    cv2.rectangle(img, (x, y), (x + w, y + h), (0, 0, 255), 5)

cv2.imshow('img', img)
cv2.waitKey()
cv2.destroyAllWindows()
